$(function() {
  setTimeout(function () {
      //  憿菟𢒰餈𥟇䔉銋见�𤾸𢆡�𤫇
      getInPage();
      //  擐㚚△�典�𤩺�𡁜𢆡
      indexSwipe();
      //  �孵稬��厰僼
      showInfoBtn();
      //  �孵稬獢��𧢲䲮��埈�厰僼��枏�獢��见��摰寥�典�
      caseListOpen();
      //  �孵稬�喲𡡒��厰僼�喲𡡒獢��见��摰寥�典�
      caseListClose();
      //  �孵稬�桃蔗撅��喲𡡒獢��见��摰寥�典�
      caseListClose2();
      //  曌䭾��宏撘�霂湔�擧𧒄霂湔�擧芋��𡑒䌊�𢆡瘨�仃
      indexInfoHide();
      //  ����𡏭”��閙�厰僼
      indexCooFormShow();
  },500)
});

//  憿菟𢒰餈𥟇䔉銋见�𤾸𢆡�𤫇
function getInPage() {
    $("body").removeClass("body-hide");
}

//  擐㚚△�典�𤩺�𡁜𢆡
function indexSwipe() {
  var indexSwiper1 = new Swiper('.index-banner-container', {
    wrapperClass : 'index-banner-wrapper',  //  霈曄蔭wrapper��css蝐餃�溻��
    slideClass : 'index-banner-list',  //  霈曄蔭slide��蝐餃�溻��
    slideActiveClass: 'index-banner-list-active', //  霈曄蔭瘣餃𢆡��㛖�蝐餃��
    slideNextClass : 'index-banner-list-next', //  active slide��銝衤�銝泅lide��蝐餃�溻��
    slidePrevClass : 'index-banner-list-prev', //  active slide��銝𠹺�銝泅lide��蝐餃�溻��

    pagination : '.index-swiper-contain',
    paginationClickable :true,
    bulletClass : 'index-swiper-bullet',
    bulletActiveClass : 'index-swiper-bullet-active',
    paginationClickableClass : 'index-swiper-clickable',
    paginationModifierClass : 'index-swiper-',
    paginationBulletRender: function (swiper, index, className) {
      return '<span class="' + className + '">' + '<i></i></span>';
    },

    speed: 800,
    grabCursor: true, //  霈曄蔭銝演rue�𧒄嚗屸�䭾�����𠼦wiper�𧒄������𡁜�䀹�鞉�𧢲��耦�𠶖嚗峕�硋𢆡�𧒄������𡁜�䀹�鞉�𤘪�见耦�𠶖
    setWrapperSize :true, //  撘��鍳餈嗘葵霈曉�帋�𡁜銁Wrapper銝𦠜溶��删�劐�粃lides�㮾��删�摰賡��
    shortSwipes : true, //  霈曄蔭銝榻alse�𧒄嚗諹�𥡝��翰�毺�頝萘氖����硋𢆡��䭾�閗圻��騌wiper��
    mousewheelControl : true, //  �糓�炏撘��鍳曌䭾��綉��Swiper���揢��

    onTransitionEnd: function(swiper){
      $("#showInfoBtn").removeClass("hidden");
      $("#indexIndCon").removeClass("slide-top");
      $("#indexBannerCon").find(".index-banner-list").children(".intro-container").removeClass("intro-show");
    }
  });
}

//  �孵稬��厰僼
function showInfoBtn() {
  var a1 = $("#showInfoBtn");
  var a2 = $("#indexBannerCon");
  var a3 = $("#indexIndCon");

  a1.on("click",function() {
    a1.addClass("hidden");
    a2.find(".index-banner-list").children(".intro-container").removeClass("intro-show");
    a2.find(".index-banner-list.index-banner-list-active").children(".intro-container").addClass("intro-show");
    a3.addClass("slide-top");
  });
}

//  曌䭾��宏撘�霂湔�擧𧒄霂湔�擧芋��𡑒䌊�𢆡瘨�仃
function indexInfoHide() {
  $(".intro-container").on("mouseleave",function() {
    $(this).removeClass("intro-show");
    $("#showInfoBtn").removeClass("hidden");
    $("#indexIndCon").removeClass("slide-top");
  });
}

//  �孵稬獢��𧢲䲮��埈�厰僼��枏�獢��见��摰寥�典�
function caseListOpen() {
  $("#caseShowBtn").click(function() {
    var winWidth = $(window).width();
    if(winWidth > 767) {
      $(".case-show-mask-1").addClass("show").bind("mouseenter",zZEnter1).bind("mouseleave",zZLeave1);
    }
    else {
      $(".case-show-mask-1").addClass("show").unbind("mouseenter",zZEnter1).unbind("mouseleave",zZLeave1);
    }
    $("#caseToggleContent").css("left","0");
  });
}
//  �孵稬�喲𡡒��厰僼�喲𡡒獢��见��摰寥�典�
function caseListClose() {
  $("#caseToggleCloseBtn").click(function() {
    var winWidth = $(window).width();
    if(winWidth > 767) {
      $("#caseToggleContent").css("left","-80%");
    }
    else {
      $("#caseToggleContent").css("left","-100%");
    }
    $(".case-show-mask-1").removeClass("show").unbind("mouseenter",zZEnter1).unbind("mouseleave",zZLeave1);
  });
}
//  �孵稬�桃蔗撅��喲𡡒獢��见��摰寥�典�
function caseListClose2() {
  $(".case-show-mask-1").click(function() {
    var winWidth = $(window).width();
    if(winWidth > 767) {
      $("#caseToggleContent").css("left","-80%");
    }
    else {
      $("#caseToggleContent").css("left","-100%");
    }
    $(".case-show-mask-1").removeClass("show").unbind("mouseenter",zZEnter1).unbind("mouseleave",zZLeave1);
  });
}
//  曌䭾���𤏸���桃蔗撅�獢��见��摰寥�典�撘寞�批𢆡�𤫇�遆�㺭
function zZEnter1() {
  $("#caseToggleContent").css("left","-15px");
}
function zZLeave1() {
  $("#caseToggleContent").css("left","0");
}

function indexCooFormShow() {
  $("#cooFormShowBtn").on("click",function() {
    $("#cooFormCon").addClass("show");
  });
  $("#cooFormCloseBtn").on("click",function() {
    $("#cooFormCon").removeClass("show");
  });
}